package com.pai4j.user.service.relation;

import com.pai4j.common.enums.AccountRelationTypeEnum;
import org.springframework.stereotype.Service;


@Service
public class User2AIAgentSenderAccountRelationService extends AbstractAccountRelationService{


    @Override
    protected AccountRelationTypeEnum getRelationType() {

        return AccountRelationTypeEnum.USER_AI_AGENT;
    }

    @Override
    protected boolean isAsyncDoAfterComplete() {

        return false;
    }

    @Override
    protected void doAfterComplete(Long id, String sourceAccount, String targetAccount, boolean subscribe) {
        // 文件传输助手，用户注册后默认订阅，无需审核
        // 添加文件传输助手到用户好友列表缓存
        super.addTargetAccountRelationListCache(sourceAccount, targetAccount);
        // 添加文件传输助手到用户聊天对话列表缓存
        super.addTargetAccount2SourceLastChattingList(sourceAccount, targetAccount, Long.MAX_VALUE);
    }
}
